<?php /* Smarty version Smarty-3.1.12, created on 2012-12-18 23:33:31
         compiled from ".\templates\demo_form.tpl" */ ?>
<?php /*%%SmartyHeaderCode:244150d0fd4b23e3b5-44233573%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b581f4dea46acadd81cb1442f5439a32a038406b' => 
    array (
      0 => '.\\templates\\demo_form.tpl',
      1 => 1270129680,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '244150d0fd4b23e3b5-44233573',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'edit_mode' => 0,
    'demo_counter' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_50d0fd4b3aa470_75437003',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_50d0fd4b3aa470_75437003')) {function content_50d0fd4b3aa470_75437003($_smarty_tpl) {?><form method="POST" name="demo_form">

<input type="hidden" name="edit_mode" 
    value="<?php if ($_smarty_tpl->tpl_vars['edit_mode']->value){?>true<?php }else{ ?>false<?php }?>">

<table border="0" cellpadding="5" cellspacing="0">
    <tr>
        <td>Demo Text:</td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['edit_mode']->value){?>
                <input type="text" name="demo_text" size="20"
                    value="<?php echo htmlspecialchars($_POST['demo_text'], ENT_QUOTES, 'UTF-8', true);?>
">
            <?php }else{ ?>
                <input type="hidden" name="demo_text" 
                    value="<?php echo htmlspecialchars($_POST['demo_text'], ENT_QUOTES, 'UTF-8', true);?>
">
                <?php echo htmlspecialchars($_POST['demo_text'], ENT_QUOTES, 'UTF-8', true);?>

            <?php }?>
        </td>
    </tr>

    <tr>
        <td>Demo Checkbox:</td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['edit_mode']->value){?>
                <input type="checkbox" name="demo_checkbox" 
                    <?php if ($_POST['demo_checkbox']){?>checked<?php }?>>
            <?php }else{ ?>
                <?php if ($_POST['demo_checkbox']){?>
                    <input type="hidden" name="demo_checkbox" value="On">
                <?php }?>
                <?php if ($_POST['demo_checkbox']){?>On<?php }else{ ?>Off<?php }?>
            <?php }?>
        </td>
    </tr>

    <tr>
        <td>Demo Radio:</td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['edit_mode']->value){?>
                <input type="radio" name="demo_radio" value="1"
                    <?php if ($_POST['demo_radio']=='1'){?>checked<?php }?>>1
                <input type="radio" name="demo_radio" value="2"
                    <?php if ($_POST['demo_radio']=='2'){?>checked<?php }?>>2
                <input type="radio" name="demo_radio" value="3"
                    <?php if ($_POST['demo_radio']=='3'){?>checked<?php }?>>3
            <?php }else{ ?>
                <input type="hidden" name="demo_radio" 
                    value="<?php echo htmlspecialchars($_POST['demo_radio'], ENT_QUOTES, 'UTF-8', true);?>
">
                <?php echo htmlspecialchars($_POST['demo_radio'], ENT_QUOTES, 'UTF-8', true);?>

            <?php }?>
        </td>
    </tr>

    <tr>
        <td>Demo Select:</td>
        <td>
            <?php if ($_smarty_tpl->tpl_vars['edit_mode']->value){?>
                <select name="demo_select" size="1">
                    <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['name'] = "demo_section";
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start'] = (int)10;
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['loop'] = is_array($_loop=100) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['step'] = ((int)"10") == 0 ? 1 : (int)"10";
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['loop'];
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start'] < 0)
    $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start'] = max($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['step'] > 0 ? 0 : -1, $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['loop'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start']);
else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start'] = min($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['step'] > 0 ? $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['loop'] : $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['loop']-1);
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['total'] = min(ceil(($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['step'] > 0 ? $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['loop'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start'] : $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start']+1)/abs($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['step'])), $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['max']);
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["demo_section"]['total']);
?>
                        <?php $_smarty_tpl->tpl_vars["demo_counter"] = new Smarty_variable($_smarty_tpl->getVariable('smarty')->value['section']['demo_section']['index'], null, 0);?>
                        <option <?php if ($_POST['demo_select']==$_smarty_tpl->tpl_vars['demo_counter']->value){?>
                                selected<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['demo_counter']->value;?>
">
                            <?php echo $_smarty_tpl->tpl_vars['demo_counter']->value;?>

                        </option>
                    <?php endfor; endif; ?>
                </select>
            <?php }else{ ?>
                <input type="hidden" name="demo_select" 
                    value="<?php echo htmlspecialchars($_POST['demo_select'], ENT_QUOTES, 'UTF-8', true);?>
">
                <?php echo htmlspecialchars($_POST['demo_select'], ENT_QUOTES, 'UTF-8', true);?>

            <?php }?>
        </td>
    </tr>

    <tr>
        <td>&nbsp;</td>
        <td>
            <button type="submit" onclick="return submitDemoForm()">
                <?php if ($_smarty_tpl->tpl_vars['edit_mode']->value){?>Save<?php }else{ ?>Edit<?php }?>
            </button>
        </td>
    </tr>
</table>

</form>

<?php }} ?>